package com.dy.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @Author: dy
 * @date: 2024/5/7 12:48
 * @ClassDescription:
 */
@Data
public class UserDTO {

    @ApiModelProperty(value = "账号名称")
    @NotBlank(message = "账号名称不能为空")
    @Length(max =50, message = "账号名称不能超过50个字符")
    private String userName;

    @ApiModelProperty(value = "密码")
    @NotBlank(message = "密码不能为空")
    @Length(max =20, message = "密码不能超过20个字符")
    private String password;

    @ApiModelProperty(value = "手机号")
    @NotBlank(message = "手机号不能为空")
    @Length(max =11, message = "手机号长度最大11")
    private String phone;

    @ApiModelProperty(value = "昵称")
    @NotBlank(message = "昵称不能为空")
    @Length(max =50, message = "昵称不能超过50个字符")
    private String nickName;

    @ApiModelProperty(value = "性别")
    @NotBlank(message = "性别不能为空")
    private String sex;

    @ApiModelProperty(value = "年龄")
    @NotNull(message = "年龄不能为空")
    private Integer age;
}
